extends "../cex___toolman/cex___toolman.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "弓箭手"
	camp = "射手"
	lv = 1
	attCoe.atkRan = 2
	attCoe.atk = 18 / 8.5
	attCoe.maxHp = 300 / 112.5
	attAdd.spd += 1.5
	addSkillTxt("远程精通：当周围一格内没有敌人的时候，所有攻击伤害增加25%[特效伤害除外]")

func _onAtkChara(atkinfo):
    if checken() && atkinfo.atkType != Chara.AtkType.EFF:
        atkinfo.hurtVal *= 1.25
    ._onAtkChara(atkinfo)

func checken():
    var hasp = 1
    var v = [Vector2(0,1),Vector2(1,1),Vector2(0,-1),Vector2(-1,-1),Vector2(-1,1),Vector2(1,-1),Vector2(1,0),Vector2(-1,0)]
    for i in v:
        var ncell = cell + i
        if !sys.main.isMatin(ncell):continue
        var ncha = sys.main.matCha(ncell)
        if ncha != null:
            if ncha.team != self.team:
                hasp = 0
                break
    return hasp